<?php
error_reporting(E_ALL);    
  #db Config
  $dbHost = "localhost";
  $dbUser = "root";
  $dbPass = "";
  $dbName = "epttavm";
  
  # include Sql Class
  include "sql_class.php";
  
  
  # Sql Class Start
  $db = new D3Sql();
  # Connect MySQL
  $connect = $db->baglan($dbHost,$dbUser,$dbPass);
  
  # Select Database
  $db->dbsec($dbName);
  
  $db->sql("SET NAMES UTF8");
  
  // Debug you query.
  $db->debug = false;
  
  # User 
  include "user_class.php";
  $user = new User($db);
  if(isset($_SESSION['login']))
  {
	$loginUser = $user->getUser($_SESSION['login']);
  }
  
  # User Authority
  include "authority_class.php";
  $authority = new Authority($db);
  
  # Shop
  include "shop_class.php";
  $shop = new Shop($db);
  if(isset($_SESSION['shop_id']))
  {
	if($_SESSION['shop_id'] != 0)
	{
		$loginShop = $shop->getShop($_SESSION['shop_id']);
	}
  }
  
  
  
?>
